home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
accessinet.pxl
< prev
next >
Wrap
Text File
|
2001-08-22
|
5KB
|
213 lines
{ Filename : accessint.pxl
Purpose : <purpose>
Date : January 5, 2000
Author : <author name (optional: company)>
History:
Version : 4.40 RELEASE
Update :
Date :
--------------------------------------------------------------------------}
Initialize: {only one instance allowed}
UseCoordinates(PIXEL)
Title$ = "PiXCL Test Application"
WinExist(Title$,Res)
If Res = 0 Then Goto One_Instance
Beep
WinSetActive(Title$,Res)
WinShow(Title$,RESTORE,Res)
End
One_Instance:
UseCaption(Title$) {change the title}
WinLocate(Title$,734,80,1270,664,Res)
UseBackground(TRANSPARENT,0,128,192)
WinShow(Title$,TOPMOST,Res)
DrawBackGround
DirGet(SourceDir$) {used later for library function calls}
DragAcceptFile(ENABLE,AcceptFile)
AutoProgressBar(DISABLE)
InfoMenu(REMOVE)
WaitInput(100)
SetMenu("&File",IGNORE,
"&New",CreatingFile,
"&Open",OpeningFile,
"&Save",SavingFile,
SEPARATOR,
"E&xit!",Terminate,
ENDPOPUP,
"&View",IGNORE,
"&ToolBar",ViewToolBar,
"&StatusBar",ViewStatusBar,
ENDPOPUP,
"&Information",IGNORE,
"&Concept",Concept,
"&Help",ShowAppHelp,
SEPARATOR,
"&About",About,
ENDPOPUP)
GoSub MakeToolbar
ChangeMenuItem("&ToolBar",CHECK,TBRes)
StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
DrawStatusWinText(0,"Ready")
ChangeMenuItem("&StatusBar",CHECK,SBRes)
Wait_for_Input:
WaitInput()
Terminate:
End
Concept:
MessageBox(OK,1,INFORMATION,
"This is a skeleton of a PiXCL application. You could briefly
describe your application's function here, or provide some
basic help information.",
"PiXCL Skeleton Concept",Res)
Goto Wait_for_Input
ShowAppHelp:
{An application Help file usually has the same name as the application.}
Winhelp("a.hlp",CONTENTS,"")
Goto Wait_for_Input
About:
AboutUser("PiXCL Application Title", { or substitute Title$}
"Two lines of text goes here e.g. Application function.",
"Four Lines of additional information goes here, perhaps contact information and Web addresses")
Goto Wait_for_Input
ViewToolBar:
GetMenuStatus("&ToolBar",CHECKED,Res)
If Res = 0
GoSub MakeToolbar
ChangeMenuItem("&ToolBar",CHECK,Res)
Else
Toolbar()
ChangeMenuItem("&ToolBar",UNCHECK,Res)
Endif
Goto Wait_for_Input
ViewStatusBar:
GetMenuStatus("&StatusBar",CHECKED, Res)
If Res = 0
StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
DrawStatusWinText(0,"Ready")
ChangeMenuItem("&StatusBar",CHECK,Res)
Else
StatusWindow(DISABLE,BOTTOM,2,200,-1,0,0)
ChangeMenuItem("&StatusBar",UNCHECK,Res)
Endif
Goto Wait_for_Input
CreatingFile:
WaitInput(1)
Goto Wait_for_Input
OpeningFile:
WaitInput(1)
image$ = SourceDir$ + "\1iddnext.bmp"
Drawbitmap(20,40,image$)
Goto Wait_for_Input
SavingFile:
WaitInput(1)
Goto Wait_for_Input
PrintingFile:
WaitInput(1)
IPAddressBox(100,100,300,130,Res)
Button(310,100,400,130,PUSH,"IP Done",GettingIPAddress)
Goto Wait_for_Input
GettingIPAddress:
GetIPAddress(P,A,B,C,D)
IPAddressBox(0,0,0,0,Res)
Button()
DrawBackground
DrawNumber(10,40,A) DrawNumber(50,40,B) DrawNumber(90,40,C) DrawNumber(130,40,D)
NumToHex(P,P$)
DrawText(10,60,P$)
Goto Wait_for_Input
HelperList1:
WaitInput(1)
URL$ = "http://www.vysor.com"
InetCheckConnection(URL$,Res)
DebugMsgBox(Res)
{ InetAutodial(USERONLINE,Res)
DebugMsgBox("Ready?")
InetGoOnline("http://www.vysor.com",Res)
{ runs the Dialup Connection applet, does not invoke the browser.}
DebugMsgBox(Res)
}
Goto Wait_for_Input
HelperList2:
WaitInput(1)
DrawBackground
InetAutodialHangup(Res)
DebugMsgBox(Res)
Goto Wait_for_Input
HelperList3:
WaitInput(1)
DrawBackground
InetSetDialState("Synapse Internet",Res)
InetDial(USERONLINE,"Synapse Internet",Connection)
DebugMsgBox(Connection)
Goto Wait_for_Input
HelperList4:
WaitInput(1)
DrawBackground
InetHangup(Connection,Res)
Goto Wait_for_Input
AcceptFile:
GetDragList(FileList$)
{TODO: add file list handling here, or delete this whole label handler}
Goto Wait_for_Input
{--- Style Suggestion: place all subroutines at the end of the script.}
MakeToolbar: {subroutine}
Toolbar(RAISED, PXL_LARGE,
NULL, NULL, SEPARATOR, "", Wait_for_Input,
PXL_NEW, ENABLED, STD, "Create File", CreatingFile,
PXL_OPEN, ENABLED, STD, "Open File", OpeningFile,
PXL_SAVE, ENABLED, STD, "Save File", SavingFile,
PXL_PRINT, ENABLED, STD,"IP Address Box", PrintingFile,
HELPER_1, ENABLED, STD,"Inet Autodial", HelperList1,
HELPER_2, ENABLED, STD,"Autodial hangup", HelperList2,
HELPER_3, ENABLED, STD,"Inet Dial", HelperList3,
HELPER_4, ENABLED, STD,"Hangup", HelperList4,
NULL, NULL, SEPARATOR, "", Wait_for_Input,
HELPINFO, ENABLED, STD,"Show Help",ShowAppHelp)
Return